package erfgame.core.world.terrain;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;

import erfgame.core.Point3D;

public class WalkablePath implements Serializable {
	private List<Point3D> path;
	private byte moveType;
	private int minHeight;
	private int minWidth;
	private int weight;
	private int maxStepUp;
	private int maxStepDown;
	private int fromGridIndex;
	private int toGridIndex;
	
	public WalkablePath( WalkablePath path )
	{
		this(
				path.getMoveType(),
				new ArrayList<Point3D>( path.getPoints() ),
				path.getMinHeight(),
				path.getMinWidth(),
				path.getWeight(),
				path.getMaxStepUp(),
				path.getMaxStepDown(), 
				path.getFromGridIndex(),
				path.getToGridIndex()
		);
	}
	
	public WalkablePath( 
			byte moveType, 
			List<Point3D> path, 
			int minHeight, 
			int minWidth, 
			int weight, 
			int maxStepUp, 
			int maxStepDown, 
			int fromGridIndex, 
			int toGridIndex
	) {
		this.path = path;
		this.moveType = moveType;
		this.minHeight = minHeight;
		this.minWidth = minWidth;
		this.weight = weight;
		this.maxStepUp = maxStepUp;
		this.maxStepDown = maxStepDown;
		this.fromGridIndex = fromGridIndex;
		this.toGridIndex = toGridIndex;
	}
	
	public byte getMoveType() {
		return this.moveType;
	}
	
	public void setMoveType( byte moveType ) {
		this.moveType = moveType;
	}
	
	public List<Point3D> getPoints() {
		return this.path;
	}
	
	public void setPath( List<Point3D> path ) {
		this.path = path;
	}
	
	public int getMinWidth() {
		return this.minWidth;
	}
	
	public void setMinWidth( int minWidth ) {
		this.minWidth = minWidth;
	}
	
	public int getMinHeight() {
		return this.minHeight;
	}
	
	public void setMinHeight( int minHeight ) {
		this.minHeight = minHeight;
	}
	
	public int getWeight() {
		return this.weight;
	}
	
	public void setWeight( int weight ) {
		this.weight = weight;
	}
	
	public int getMaxStepDown() {
		return this.maxStepDown;
	}
	
	public void setMaxStepDown( int maxStepDown ) {
		this.maxStepDown = maxStepDown;
	}
	
	public int getMaxStepUp() {
		return this.maxStepUp;
	}
	
	public void setMaxStepUp( int maxStepUp ) {
		this.maxStepUp = maxStepUp;
	}

	public int getFromGridIndex() {
		return fromGridIndex;
	}

	public void setFromGridIndex(int fromGridIndex) {
		this.fromGridIndex = fromGridIndex;
	}

	public int getToGridIndex() {
		return toGridIndex;
	}

	public void setToGridIndex(int toGridIndex) {
		this.toGridIndex = toGridIndex;
	}

	
}
